package com.china_goldcard.igas.ui.pages.common;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.china_goldcard.igas.R;
import com.china_goldcard.igas.ui.core.BaseActivity;
import com.china_goldcard.myguideview.GuideInfo;
import com.china_goldcard.myguideview.MyGuideView;
import com.orhanobut.logger.Logger;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 引导页
 */
public class GuidePage extends BaseActivity {

    @BindView(R.id.my_guide_view)
    MyGuideView myGuideView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
        List<GuideInfo> images = new ArrayList<>();
        images.add(new GuideInfo(getResources().getDrawable(R.mipmap.welcome_0),getResources().getColor(R.color.welcome_bg_1)));
        images.add(new GuideInfo(getResources().getDrawable(R.mipmap.welcome_1),getResources().getColor(R.color.welcome_bg_2)));
        images.add(new GuideInfo(getResources().getDrawable(R.mipmap.welcome_2),getResources().getColor(R.color.welcome_bg_3)));
        myGuideView.setImages(images,true);
        myGuideView.setBtnClickedListener(new MyGuideView.OnBtnClickedListener() {
            @Override
            public void onClick(View view) {
                Logger.d("按钮被点击");
            }
        });
    }

    @Override
    protected Integer layoutResource() {
        return R.layout.guide_page;
    }
}
